package day003.homewordk;

public class Practice002 {
    public static void main(String[] args) {
        int res = 0, count = 0;
        for (int i = 1; i <= 100; i++) {
            if (i % 2 == 0) {
                continue;
            } else {
                res += i;
                count++;
            }
        }
        System.out.println("100以内奇数和：" + res + ",个数：" + count);

        res = 0;
        count = 0;
        int i = 0;
        while (i <= 100) {
            if (i % 2 == 0) {
                i++;
                continue;
            } else {
                res += i;
                count++;
            }
            i++;
        }
        System.out.println("100以内奇数和：" + res + ",个数：" + count);
    }
}
